// src/dto/user.ts
import { ApiProperty } from '@midwayjs/swagger';
import { Rule, RuleType } from '@midwayjs/validate';

export class novelnumDTO {
  @ApiProperty({ example:13, description: '某某分类'})
  @Rule(RuleType.number().required())
  id: number;
  @ApiProperty({ example: 2   , description: '某某分类'})
  @Rule(RuleType.number().required())
  sort: number;


}
// 列表 默认创建时间排序  每次多少条  
export class novellistDTO {
  @ApiProperty({ example: 1, description: '第几页'})
  @Rule(RuleType.number())
  page: number;

  @ApiProperty({ example: 5, description: '每次多少条'})
  @Rule(RuleType.number())
  size: number;

  @ApiProperty({ example:"斗破苍穹" , description: '模糊搜索关键词'})
  @Rule(RuleType.string())
  keyWord: string|number;



  @ApiProperty({ example:  { lv :  'ASC' } , description: '搜索热度最高的'})
  @Rule(RuleType.object())
  order: Object;

  @ApiProperty({ example: {  lv: [1,3]   }, description: '某某分类'})
  @Rule(RuleType.number())
  where: Object;

  @ApiProperty({ example: {  status: [1,3]   }, description: '某某分类'})
  @Rule(RuleType.number())
  AndWhere: Array<any>;



}